Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAE-29424 Screens #10499

Merged
merged 8 commits into from
Dec 18, 2024
Merged

AAE-29424 Screens #10499

merged 8 commits into from
Dec 18, 2024

Conversation

tomaszhanaj
Copy link
Contributor

@tomaszhanaj tomaszhanaj commented Dec 16, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)

What is the new behaviour?
https://hyland.atlassian.net/browse/AAE-29424

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:
Component TaskFormCloudComponent has changed and now is used in:
libs/content-ee/process-services-cloud-extension/src/lib/features/task-details/components/task-details-cloud-ext/task-details-cloud-ext.component.html
and needs to be replaced with newly added UserTaskCloudComponent

@@ -0,0 +1,3 @@
<div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this parent div required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

ngOnInit() {
if (this.screenId) {
this.screenComponent = { type: this.screenId };
const componentType = this.screenRenderingService.resolveComponentType(this.screenComponent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const componentType = this.screenRenderingService.resolveComponentType(this.screenComponent);
const componentType = this.screenRenderingService.resolveComponentType({ type: this.screenId });

instead of this.screenComponent = { type: this.screenId };

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about it because we lose details about type, that probably should be here but maybe YAGNI. updated

*/

import { Injectable } from '@angular/core';
import { DynamicComponentMapper } from '../../../../core/src/lib/common/services/dynamic-component-mapper.service';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import should be from `@alfresco/core, not relative path

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -0,0 +1,37 @@
<div class="adf-task-form-cloud-container" >
<adf-cloud-form #adfCloudForm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we fix indentations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

mat-button
*ngIf="showCancelButton"
id="adf-cloud-cancel-task"
(click)="onCancelClick()">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(click)="onCancelClick()">
(click)="onCancelClick()"
>
{{'ADF_CLOUD_TASK_FORM.EMPTY_FORM.BUTTONS.CANCEL' | translate}}

wdyt?

With this one, it is hard to see when button tag ends

(click)="onCancelClick()">
{{'ADF_CLOUD_TASK_FORM.EMPTY_FORM.BUTTONS.CANCEL' | translate}}

ps. can we add *ngIfs at the top of the buttons parameter lists?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

</div>
</div>


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

(error)="onError($event)"
color="primary"
id="adf-form-complete"
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>
>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

None: ''
} as const;

type TaskTypesType = (typeof TaskTypes)[keyof typeof TaskTypes];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type TaskTypesType = (typeof TaskTypes)[keyof typeof TaskTypes];
type TaskTypesType = typeof TaskTypes[keyof typeof TaskTypes];

wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

return !this.readOnly && this.taskCloudService.canUnclaimTask(this.taskDetails) && this.hasCandidateUsersOrGroups();
}

getTaskType() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
getTaskType() {
getTaskType(): void {

Can we add type also for others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}
}

ngOnInit() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move live hook to the top?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@BSekula
Copy link
Contributor

BSekula commented Dec 16, 2024

As discussed, can we change names to:

adf-cloud-user-task UserTaskCloudComponent
    adf-cloud-task-form TaskFormCloudComponent
    adf-cloud-task-screen TaskScreenCloudComponent

@tomaszhanaj tomaszhanaj force-pushed the feature/AAE-29424-screens branch from d542920 to 5c4fa3a Compare December 18, 2024 12:01
@tomaszhanaj tomaszhanaj merged commit bb036cb into develop Dec 18, 2024
18 checks passed
@tomaszhanaj tomaszhanaj deleted the feature/AAE-29424-screens branch December 18, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants